<?php


namespace app\common\model\lottery;


use app\common\model\BaseModel;

class Action extends BaseModel
{
    protected $autoWriteTimestamp = false;
    protected $name = 'lottery';

    public function goods()
    {
        return $this->hasMany(Goods::class, 'lottery_id', 'id')
            ->order('sort asc');
    }

    public function getUsersAttr($value)
    {
        return json_decode($value, true);
    }

}